ShellExecute and the "App Files" concept
Hi all, Just starting to get our apps working with Vista. We write files to folders under our product in Program Files. It looks like we will have to default to another place, and try to discourage people from writing to Program Files. But, there is one thing I don't know how to get around. We have a customReport Writer app which we kick off from our main app to allow users to modify reports. Typically, they will only modify their custom reports, but one scenario for its use is that the user will want to edit the report that's currently open (which is a "standard report" we deliver with our product, under Program Files) and save their own version of the report. We are seeing two different behaviors: when we run our ReportWriter.exe from Explorer or from the desktop, it works as we would expect; you can open a standard report file, edit it, and save it elsewhere. BUT, if you run ReportWriter.exe from a cmd window, OR by kicking it off using ShellExecute from our main app, it cannot properly open the standard report files. If we pass the report filename in on the command line, the paper size is screwed up (it looks like) and we get hundreds of inches of blank report, can't find the contents. If we just run ReportWriter.exe from a cmd window with no arguments, it will show the standard report files on a File Open dialog, but when we try to open one, it "hangs" until it tells us we are running low on memory, and we're never able to open the report. Is there some way we can either enable the app to open these files when kicked off from ShellExecute or cmd window, or have the app detect that it just isn't gonna work, and fail gracefully?
March 17th, 2007 3:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics